home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
X User Tools
/
X User Tools (O'Reilly and Associates)(1994).ISO
/
sun4c
/
archive
/
tcltk.z
/
tcltk
/
man
/
cat3
/
CallDel.3
< prev
next >
Wrap
Text File
|
1994-09-20
|
3KB
|
133 lines
Tcl_CallWhenDeleted(3)Tcl Library Procedures 7.0
_________________________________________________________________
NAME
Tcl_CallWhenDeleted, Tcl_DontCallWhenDeleted - Arrange for
callback when interpreter is deleted
SYNOPSIS
#include <tcl.h>
Tcl_CallWhenDeleted(_i_n_t_e_r_p, _p_r_o_c, _c_l_i_e_n_t_D_a_t_a)
Tcl_DontCallWhenDeleted(_i_n_t_e_r_p, _p_r_o_c, _c_l_i_e_n_t_D_a_t_a)
ARGUMENTS
Tcl_Interp *_i_n_t_e_r_p (in) Interpreter
with which to
associated
callback.
Tcl_InterpDeleteProc *_p_r_o_c (in) Procedure to
call when
_i_n_t_e_r_p is
deleted.
ClientData _c_l_i_e_n_t_D_a_t_a (in) Arbitrary
one-word value
to pass to
_p_r_o_c.
_________________________________________________________________
DESCRIPTION
Tcl_CallWhenDeleted arranges for _p_r_o_c to be called by
Tcl_DeleteInterp if/when _i_n_t_e_r_p is deleted at some future
time. _P_r_o_c will be invoked just before the interpreter is
deleted, but the interpreter will still be valid at the time
of the call. _P_r_o_c should have arguments and result that
match the type Tcl_InterpDeleteProc:
typedef int Tcl_InterpDeleteProc(
ClientData _c_l_i_e_n_t_D_a_t_a,
Tcl_Interp *_i_n_t_e_r_p);
The _c_l_i_e_n_t_D_a_t_a and _i_n_t_e_r_p parameters are copies of the
_c_l_i_e_n_t_D_a_t_a and _i_n_t_e_r_p arguments given to
Tcl_CallWhenDeleted. Typically, _c_l_i_e_n_t_D_a_t_a points to an
application-specific data structure that _p_r_o_c uses to per-
form cleanup when an interpreter is about to go away. _P_r_o_c
does not return a value.
Tcl_DontCallWhenDeleted cancels a previous call to
Tcl_CallWhenDeleted with the same arguments, so that _p_r_o_c
won't be called after all when _i_n_t_e_r_p is deleted. If there
is no deletion callback that matches _i_n_t_e_r_p, _p_r_o_c, and
Tcl 1
Tcl_CallWhenDeleted(3)Tcl Library Procedures 7.0
_c_l_i_e_n_t_D_a_t_a then the call to Tcl_DontCallWhenDeleted has no
effect.
KEYWORDS
callback, delete, interpreter
Tcl 2